package com.sky.mapper;

import com.sky.entity.OrderDetail;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * com.sky.service.impl
 * OrderDetailMapper
 *
 * @since 2024/11/4
 */
@Mapper
public interface OrderDetailMapper {
   /**
    * 批量插入订单明细数据
    * @param orderDetailList
    */
   void insertBatch(List<OrderDetail> orderDetailList);

   /**
    * 获取用户订单Id当前订单明细表
    * @param ordersId
    * @return
    */
   @Select("select * from order_detail where order_id = #{ordersId}")
   List<OrderDetail> getByOrderId(Long ordersId);
}
